package o2o.dao.VO.sys;

//系统参数（前端用）
public class SysSettingMobileVO  implements Comparable<SysSettingMobileVO> {

    private String code;   //配置项编号
    private String name;    //配置项名称
    private String descs;   //配置描述
    private String note;   //配置备注
    private String val;      //系统配置值
    private String valInfo;      //存储val中的值，用,隔开
    private String group;      //分组
    private String categoryCode;      //分类编码
    private Integer isShow;//是否前台显示  1显示  0不显示
    private long id;

    public String getValInfo() {
        return valInfo;
    }

    public void setValInfo(String valInfo) {
        this.valInfo = valInfo;
    }

    public String getCategoryCode() {
        return categoryCode;
    }

    public void setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescs() {
        return descs;
    }

    public void setDescs(String descs) {
        this.descs = descs;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getVal() {
        return val;
    }

    public void setVal(String val) {
        this.val = val;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }
    @Override
    public int compareTo(SysSettingMobileVO o) {  //重写Comparable接口的compareTo方法，降序
        // 先按isShow排序
        if (this.isShow > o.getIsShow()) {
            return  (o.getIsShow() - this.isShow);
        }
        if (this.isShow < o.getIsShow()) {
            return  (o.getIsShow() - this.isShow);
        }
        // 按name排序
        if (this.name.compareTo(o.getName()) > 0) {
            return 1;
        }
        if (this.name.compareTo(o.getName()) < 0) {
            return -1;
        }
        return 0;
    }
}
